package com.hnevc.trafficdemotest1.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;

/**
 * Created by Administrator on 2017/12/25.
 */

public class RechargeDialog extends Dialog {


    public RechargeDialog(Context context) {
        super(context);
    }
    public RechargeDialog(Context context, int themeResId) {
        super(context, themeResId);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // 预先设置Dialog的一些属性
        Window dialogWindow = getWindow();
        WindowManager.LayoutParams p = dialogWindow.getAttributes();
        p.gravity = Gravity.CENTER;
        dialogWindow.setAttributes(p);
    }
}
